package com.wanban.adutils.tools

object AdConstants {
    const val FB_TEST_UNIT_ID = "IMG_16_9_LINK#YOUR_PLACEMENT_ID"
//    public static final String FB_TEST_UNIT_ID = "YOUR_PLACEMENT_ID";

    //    public static final String FB_TEST_UNIT_ID = "YOUR_PLACEMENT_ID";
    const val TAG = "wbAd"

    const val ADVERTISER_ADMOB = 1
    const val ADVERTISER_FACEBOOK = 2
    const val ADVERTISER_OPEN_MEDIATION = 3
    const val ADVERTISER_APPLOVIN = 4
    const val ADVERTISER_IRON_SOURCE = 5

    const val ADTYPE_INTERSTITIAL = 4
    const val ADTYPE_REWARDED = 5
    const val ADTYPE_BANNER = 6
    const val ADTYPE_OPEN = 7
    const val ADTYPE_PAUSE_VIDEO = 8
    const val ADTYPE_INSTREAM_VIDEO = 9
    const val ADTYPE_SPLASH = 11


    const val ERROR_CODE_INTERNAL_ERROR = 0
    const val ERROR_CODE_INVALID_REQUEST = 1
    const val ERROR_CODE_NETWORK_ERROR = 2
    const val ERROR_CODE_NO_FILL = 3
    const val ERROR_CODE_LOADED = 4
    const val ERROR_CODE_AD_OUT_OF_TIME = 13
    const val ERROR_CODE_AD_LOADED_CAN_NOT_SHOW = 14
    const val ERROR_CODE_AD_CONTENT_NULL = 15
    const val ERROR_CODE_LOADING = 16
    const val ERROR_CODE_ACTIVITY_DESTROYED = 17
    const val ERROR_CODE_AD_IS_SHOWING = 18
    const val ERROR_CODE_AD_NO_REWARD = 19


    /*************  ***************/

    // 广告没配置
    const val ERROR_CODE_AD_NO_SETTING = 21
    // 找不到AdLoader
    const val ERROR_CODE_AD_NO_LOADER = 22
    // Activity已经失效
    const val ERROR_CODE_ACTIVITY_NOT_ACTIVE = 23
    // 广告不到展示时间
    const val ERROR_CODE_CAN_NOT_SHOW_TIME = 24
    // 广告位没有设置
    const val ERROR_CODE_AD_UNIT_NULL = 25

    /**
     * 广告默认超时时间
     */
    const val AD_DEFAULT_TIME_OUT = 10
    const val AD_DEFAULT_SHOW_TIME = 4


    /**
     * 广告ID
     */
    const val AD_ID_OPEN: Long = 1100000000
    const val AD_ID_VIDEO_DETAIL_INTERSTITIAL: Long = 1100000001
    const val AD_ID_VIDEO_DETAIL_PAUSE: Long = 1100000002
    const val AD_ID_LOCK_REWARD_AD: Long = 1100000003
    const val AD_ID_LOCK_INTERSTITIAL_AD: Long = 1100000004
    const val AD_ID_DOWNLOAD_REWARD_AD: Long = 1100000005
    const val AD_ID_DOWNLOAD_INTERSTITIAL: Long = 1100000006
    const val AD_ID_DOWNLOAD_PLAYER_INTERSTITIAL_AD: Long = 1100000007
    const val AD_ID_VIDEO_INSTREAM_AD: Long = 1100000008
    const val AD_ID_REOPEN_AD: Long = 1100000009
    const val AD_ID_OPEN_AD_V2: Long = 1100000010
    const val AD_ID_VIDEO_DETAIL_BANNER: Long = 1100000011
//    const val AD_ID_SPLASH: Long = 1100000012

//    const val AD_ID_NATIVE: Long = 1100000010
//    const val AD_ID_INTERSTITIAL: Long = 1100000011
//    const val AD_ID_REWARDED: Long = 1100000012
//    const val AD_ID_BANNER: Long = 1100000013
//    const val AD_ID_SPLASH: Long = 1100000014





    /**
     * ---------------------------- 广告统计 -------------------------------
     */
    const val EVENT_APP = "event_app"

    /** 所有广告请求次数 */
    const val KEY_AD_LOAD_AD = "ad_request"

    /** banner广告 */
    const val EVENT_BANNER_AD = "ad_banner"

    /** 暂停广告 */
    const val EVENT_OPEN_AD = "ad_open"



    /** 开屏广告 */
    const val EVENT_PAUSE_AD = "ad_pause"
    const val EVENT_INSTREAM_AD = "ad_instream"
    const val EVENT_INTERSTITIAL_REOPEN = "ad_interstitial_reopen"

    /** 插屏广告相关统计 */
    const val EVENT_INTERSTITIAL_AD = "ad_interstitial_video"

    /** 激励广告相关统计 */
    const val EVENT_REWARDED_DOWNLOAD = "ad_reward_download"
    const val EVENT_INTERSTITIAL_DOWNLOAD_AD = "ad_interstitial_download"
    const val EVENT_REWARDED_LOCK = "ad_reward_lock"
    const val EVENT_INTERSTITIAL_LOCK = "ad_interstitial_lock"
    const val EVENT_INTERSTITIAL_DOWNLOAD_PLAY = "ad_interstitial_download_play"
    const val EVENT_UNKNOWN_AD = "ad_unknown"

    /** IronSource广告 */
    const val EVENT_IS_AD = "IronSourceAdEvent"

    // 加载广告时间
    const val KEY_AD_ADVERTISER = "advertiser"
    const val KEY_AD_RESULT = "status"
    const val KEY_AD_REQUEST_TIMES = "request"
    const val KEY_AD_CLICK = "click"
    const val KEY_AD_ERROR_CODE = "errorCode"
    const val KEY_AD_VERSION = "version"
    const val EVENT_FILL_AD = "event_fillAd"


    // 开屏广告统计
    const val EVENT_OPEN_AD_STATUS = "open_ad_status_event"
    // 广告开屏状态，包括成功和失败
    const val KEY_OPEN_AD_LOAD_STATUS = "open_ad_load_status"
    // 开屏广告加载到展示的流程
    const val KEY_OPEN_AD_SHOW_PROGRESS = "open_ad_load_show_progress"
    // 开屏广告显示次数
    const val KEY_OPEN_AD_SHOW_TIMES = "open_ad_load_show_times"


    // Reopen广告统计
    const val EVENT_REOPEN_AD_STATUS = "reopen_ad_status_event"
    // 没有配置reopen广告
    const val KEY_REOPEN_AD_IS_SETTING = "reopen_ad_is_setting"
    // 广告开屏状态，包括成功和失败
    const val KEY_REOPEN_AD_LOAD_STATUS = "reopen_ad_load_status"
    // 无法加载reopen开屏广告原因
    const val KEY_REOPEN_AD_CANNOT_LOAD = "reopen_ad_cannot_load"
    // 统计从切到后台，在返回，是否能正常加载广告
    const val KEY_REOPEN_AD_LOAD_PROGRESS = "reopen_ad_load_progress"
}